package com.wgo.surveyModel.domain.server.ejb;
import static javax.persistence.GenerationType.AUTO;
import static javax.persistence.InheritanceType.TABLE_PER_CLASS;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.OneToMany;

import com.wgo.surveyModel.domain.common.Vessel;
import com.wgo.surveyModel.domain.common.impl.SurveyDefImpl;

@Entity
@Inheritance(strategy = TABLE_PER_CLASS)
public class SurveyDefEjb extends SurveyDefImpl
{
  	
    @Override	
	@Id
    @GeneratedValue(strategy=AUTO)
  	public Long getDbId() 
	{
		return super.getDbId();
	} 

	@Override
	@OneToMany(mappedBy = "surveydef", targetEntity = VesselEjb.class, cascade = {CascadeType.ALL })	
	public Set<Vessel> getVessels ()
	{
		return super.getVessels();
	}
  
}
